package EnumDemo.Practice;

/**
 * @Description :
 * @author: cww
 * @DateTime: 2018-07-29 11:16
 */

public abstract class WeakDay1 {
    private WeakDay1(){}
    public final static WeakDay1 SUM = new WeakDay1(){

        @Override
        public WeakDay1 nextDay() {
            return SUM;
        }
    };
    public final static WeakDay1 MON = new WeakDay1(){

        @Override
        public WeakDay1 nextDay() {
            return MON;
        }
    };
    public final static WeakDay1 TUE = new WeakDay1(){

        @Override
        public WeakDay1 nextDay() {
            return TUE;
        }
    };

    public abstract WeakDay1 nextDay();

    @Override
    public String toString(){
        return (this==SUM)?"SUM":(this==MON)?"MON":"TUE";
    }
}
